package com.xxtx.trade.common.exception;


import com.xxtx.trade.common.util.model.Result;

/**
 * 功能描述:
 *
 * @Params:
 * * @Author:
 * @Date: 2019/7/4 10:04
 */
public class BusinessException extends RuntimeException {

    private int code;

    private String message;

    public BusinessException(String message){
        super(message);
        this.message = message;
    }
    public BusinessException(int code, String message){
        super(message);
        this.code = code;
        this.message = message;
    }

    public BusinessException(Result result){
        super(result.getMessage());
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
